namespace GPSTrackingReports
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;

    /// <summary>
    /// Summary description for CustomAgentsByClients.
    /// </summary>
    public partial class AgentsTimeByClientsReports : Telerik.Reporting.Report
    {
        public AgentsTimeByClientsReports()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        public void SetParameters(DateTime dateBegin, DateTime dateEnd, int companyID, Image logo)
        {
            sqlDataSource1.Parameters["@DateBegin"].Value = dateBegin;
            sqlDataSource1.Parameters["@DateEnd"].Value = dateEnd;
            sqlDataSource1.Parameters["@CompanyID"].Value = companyID;

            pictureBox1.Value = logo;
            pictureBox1.Width = Unit.Pixel(logo.Width);
            pictureBox1.Height = Unit.Pixel(logo.Height);
        }
    }
}